package com.xiaoran.service.config;

import org.I0Itec.zkclient.ZkClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

@Configuration
public class BeanConfig {
    
    @Resource
    private ServerValue serverValue;
    
    @Bean
    public ZkClient zkClient(){
        return new ZkClient(serverValue.getZkAddr(),serverValue.getConnectTimeout());
    }
}
